<!doctype html>



  


<html class="theme-next mist use-motion" lang="en">
<head>
  <!-- hexo-inject:begin --><!-- hexo-inject:end --><meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />












  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="llvm," />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.0" />






<meta name="description" content="此文介绍编译器，llvm和jit">
<meta property="og:type" content="article">
<meta property="og:title" content="llvm和jit">
<meta property="og:url" content="https://annashuo.github.io/2017/08/24/llvm和jit/index.html">
<meta property="og:site_name" content="Anna's Blog">
<meta property="og:description" content="此文介绍编译器，llvm和jit">
<meta property="og:image" content="https://github.com/Annashuo/hello-world/blob/master/%E4%BC%A0%E7%BB%9F%E7%BC%96%E8%AF%91%E5%99%A8.png?raw=true">
<meta property="og:image" content="https://github.com/Annashuo/hello-world/blob/master/%E8%AF%A6%E7%BB%86%E7%89%88%E4%BC%A0%E7%BB%9F%E7%BC%96%E8%AF%91%E5%99%A8.png?raw=true">
<meta property="og:image" content="https://github.com/Annashuo/hello-world/blob/master/LLVM三阶段.png?raw=true">
<meta property="og:image" content="https://github.com/Annashuo/hello-world/blob/master/LLVM文件转换.png?raw=true">
<meta property="og:image" content="https://github.com/Annashuo/hello-world/blob/master/静态编译.png?raw=true">
<meta property="og:image" content="https://github.com/Annashuo/hello-world/blob/master/动态编译.png?raw=true">
<meta property="og:image" content="https://github.com/Annashuo/hello-world/blob/master/jit.png?raw=true">
<meta property="og:image" content="https://github.com/Annashuo/hello-world/blob/master/api.png?raw=true">
<meta property="og:updated_time" content="2017-08-25T21:19:53.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="llvm和jit">
<meta name="twitter:description" content="此文介绍编译器，llvm和jit">
<meta name="twitter:image" content="https://github.com/Annashuo/hello-world/blob/master/%E4%BC%A0%E7%BB%9F%E7%BC%96%E8%AF%91%E5%99%A8.png?raw=true">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    sidebar: {"position":"right","display":"post"},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: 'Author'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://annashuo.github.io/2017/08/24/llvm和jit/"/>





  <title> llvm和jit | Anna's Blog </title><!-- hexo-inject:begin --><!-- hexo-inject:end -->
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="en">

  
<!-- hexo-inject:begin --><!-- hexo-inject:end --><script>
  window.fbAsyncInit = function() {
    FB.init({
      appId      : '',
      xfbml      : true,
      version    : 'v2.6'
    });
  };

  (function(d, s, id){
     var js, fjs = d.getElementsByTagName(s)[0];
     if (d.getElementById(id)) {return;}
     js = d.createElement(s); js.id = id;
     js.src = "//connect.facebook.net/en/sdk.js";
     fjs.parentNode.insertBefore(js, fjs);
   }(document, 'script', 'facebook-jssdk'));
</script>



<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  ga('create', 'UA-105321506-1', 'auto');
  ga('send', 'pageview');
</script>


  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?6f5ab2ef1e021070500f7228c830f3c6";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>








  
  
    
  

  <div class="container one-collumn sidebar-position-right page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-meta ">
  

  <div class="custom-logo-site-title">
    <a href="/"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">Anna's Blog</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
    
      <p class="site-subtitle">My heart is in the work...</p>
    
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            Home
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            Categories
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            Archives
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            Tags
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="https://annashuo.github.io/2017/08/24/llvm和jit/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="Anna">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="/images/avatar.gif">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="Anna's Blog">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="Anna's Blog" src="">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                llvm和jit
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2017-08-24T17:09:16-04:00">
                2017-08-24
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">In</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/STUDY/" itemprop="url" rel="index">
                    <span itemprop="name">STUDY</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/2017/08/24/llvm和jit/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count fb-comments-count" data-href="https://annashuo.github.io/2017/08/24/llvm和jit/" itemprop="commentCount">0</span> comments
                </a>
              </span>
            
          

          

          
          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>此文介绍编译器，llvm和jit</p>
<a id="more"></a>
<h3 id="传统三段式编译器"><a href="#传统三段式编译器" class="headerlink" title="传统三段式编译器"></a>传统三段式编译器</h3><p><img src="https://github.com/Annashuo/hello-world/blob/master/%E4%BC%A0%E7%BB%9F%E7%BC%96%E8%AF%91%E5%99%A8.png?raw=true" alt="传统编译器"></p>
<p>详细版：</p>
<p><img src="https://github.com/Annashuo/hello-world/blob/master/%E8%AF%A6%E7%BB%86%E7%89%88%E4%BC%A0%E7%BB%9F%E7%BC%96%E8%AF%91%E5%99%A8.png?raw=true" alt="详细版传统编译器"></p>
<ul>
<li>前端解析源代码，检查错误，并构建语言特定的抽象语法树(AST)</li>
<li>优化器负责进行各种转换，尝试改进代码的运行时间，例如消除冗余计算</li>
<li>后端将代码映射到目标指令集上，包括指令选择，寄存器分配和指令调度</li>
</ul>
<h3 id="LLVM三阶段设计"><a href="#LLVM三阶段设计" class="headerlink" title="LLVM三阶段设计"></a>LLVM三阶段设计</h3><p><img src="https://github.com/Annashuo/hello-world/blob/master/LLVM三阶段.png?raw=true" alt=""></p>
<p>任何一种前端，只要生成LLVM IR文件，都可以复用LLVM的优化器和后端。默认的LLVM的c语言前端是clang。</p>
<h3 id="LLVM几种格式的文件转换"><a href="#LLVM几种格式的文件转换" class="headerlink" title="LLVM几种格式的文件转换"></a>LLVM几种格式的文件转换</h3><p><img src="https://github.com/Annashuo/hello-world/blob/master/LLVM文件转换.png?raw=true" alt="LLVM文件转换"></p>
<ul>
<li>a.c：c语言源码</li>
<li>a.bc：llvm字节码二进制表示</li>
<li>a.ll：llvm字节码文本形式</li>
<li>a.s：机器汇编码</li>
<li>a.out：可执行的二进制文件</li>
</ul>
<p><strong>.bc 和 .ll文件就是LLVM IR文件，两者是同一内容的不同表示方式。</strong></p>
<h4 id="c源码，IR的比较"><a href="#c源码，IR的比较" class="headerlink" title="c源码，IR的比较"></a>c源码，IR的比较</h4><p>add.c</p>
<pre><code>unsigned add(unsigned a, unsigned b){
    return a + b;
}
</code></pre><p>clang编译不优化</p>
<pre><code>编译命令：clang -S -emit-llvm add.c -o add.ll
</code></pre><p>LLVM IR表示<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div></pre></td><td class="code"><pre><div class="line">define i32 @add(i32 %a, i32 %b) #0 &#123;</div><div class="line">entry:</div><div class="line"> 		%a.addr = alloca i32, align 4</div><div class="line"> 		%b.addr = alloca i32, align 4</div><div class="line"> 		store i32 %a, i32* %a.addr, align 4</div><div class="line"> 		store i32 %b, i32* %b.addr, align 4</div><div class="line"> 		%0 = load i32, i32* %a.addr, align 4</div><div class="line"> 		%1 = load i32, i32* %b.addr, align 4</div><div class="line"> 		%add = add i32 %0, %1</div><div class="line"> 		ret i32 %add</div><div class="line">&#125;</div></pre></td></tr></table></figure></p>
<p>clang编译O3优化</p>
<pre><code>编译命令：clang -O3 -S -emit-llvm add.c -o add.ll
</code></pre><p>LLVM IR表示：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">define i32 @add(i32 %a, i32 %b) #0 &#123;</div><div class="line">entry:</div><div class="line"> 		%add = add i32 %b, %a</div><div class="line"> 		ret i32 %add</div><div class="line">&#125;</div></pre></td></tr></table></figure></p>
<p>除此之外，llvm支持O4优化，即多个.bc文件进行link的时候进行优化。而且llvm支持在优化器加入自定义的pass来优化字节码，从而根据具体场景生成更优的机器码。这些都是gcc不具备的功能。</p>
<h3 id="动态编译与即时编译器"><a href="#动态编译与即时编译器" class="headerlink" title="动态编译与即时编译器"></a>动态编译与即时编译器</h3><h4 id="静态编译和动态编译"><a href="#静态编译和动态编译" class="headerlink" title="静态编译和动态编译"></a>静态编译和动态编译</h4><ul>
<li><p>静态编译</p>
<p><img src="https://github.com/Annashuo/hello-world/blob/master/静态编译.png?raw=true" alt=""></p>
<p>逐行编译执行。</p>
</li>
<li><p>动态编译</p>
<p><img src="https://github.com/Annashuo/hello-world/blob/master/动态编译.png?raw=true" alt=""></p>
<p>预编译至字节码格式，即时编译器根据执行的过程的信息一次性编译成最优的二进制机器码执行。</p>
</li>
</ul>
<h4 id="即时编译器JIT"><a href="#即时编译器JIT" class="headerlink" title="即时编译器JIT"></a>即时编译器JIT</h4><p>JIT最早出现于java中，现以JIT 编译器在 JVM 中的运作原理为主介绍JIT，在llvm中过程类似。</p>
<p><img src="https://github.com/Annashuo/hello-world/blob/master/jit.png?raw=true" alt=""></p>
<p>字节码的执行模式一般有三种：</p>
<ul>
<li>完全采用解释器模式执行</li>
<li>完全采用即时编译器模式执行</li>
<li>采用解释器+即时编译器混合模式执行</li>
</ul>
<p>完全采用即时编译器并不是一种高效的做法。即时编译器的开销大，如果编译的代码仅仅只执行一次，采用解释器逐行进行解释执行的效率会比采用即时编译器一次全部编译后执行更高。但如果一段代码被多次调用，即时编译器会做类型特化。比如重复调用add(x,y)函数，解释器解释执行时需要判断x和y的类型，即使实际代码中x和y始终是int型，解释器也不能忽略这些操作。但是即时编译器可以根据调用时的情况，将函数编译成add_int(x:int, y:int)，减少了类型判断的操作。</p>
<p>解释器+即时编译器混合模式本质是一种静态编译，但是解释器在逐行执行时，若发现某段代码是要求即时编译的，则启动即时编译器编译这段代码，然后嵌入到内存中，在逐行执行的过程中，会根据地址到内存中取出即时编译器编译的结果，当成一条指令运行。</p>
<p>LLVM中采用解释器+即时编译器混合模式。LLVM3.6以上执行引擎库称为MC库，其中MCJIT基于核心MC库。LLVM默认使用MC库解释执行字节码，但开发人员可以通过c或c++的接口函数编写和修改LLVM的IR代码，定义某一部分代码的执行引擎为MCJIT，从而调用JIT执行该部分代码。</p>
<h3 id="LLVM-IR"><a href="#LLVM-IR" class="headerlink" title="LLVM IR"></a>LLVM IR</h3><p>LLVM支持c++和C api编写和修改LLVM IR文件。通过这两种api编写的LLVM代码，不需要再经过编译器前端的解析就可以直接生成LLVM IR文件。因为LLVM IR接近于汇编语言的代码逻辑，所以写起来会比较繁琐。</p>
<h4 id="LLVM-IR框架"><a href="#LLVM-IR框架" class="headerlink" title="LLVM IR框架"></a>LLVM IR框架</h4><p><img src="https://github.com/Annashuo/hello-world/blob/master/api.png?raw=true" alt=""></p>
<p>module是多个function的集合，它对应一个执行引擎engine，engine可以是纯MC类型的也可以是MCJIT类型的，这决定了这个module采用何种执行方式。Target指明了这个engine是执行在什么目标机器上。</p>
<p>每个function内部由多个basic block构成。譬如一个条件语句包含三个basic block：判断，iftrue，iffalse。判断块负责执行判断指令，iftrue块执行条件成立时的代码，iffalse块执行条件不成立时的代码。</p>
<p>每一个basic block包含多条指令，这里的指令主要是load，store，add，minus，leal等类似于汇编逻辑的指令。</p>
<p>LLVM C API随着LLVM版本一直在变，目前还没有稳定下来，目前已知LLVM3.6版本和3.7版本API不可通用，3.7和4.0以上版本不可通用。</p>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>


    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/llvm/" rel="tag"># llvm</a>
          
        </div>
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/08/24/llvm安装/" rel="next" title="llvm安装">
                <i class="fa fa-chevron-left"></i> llvm安装
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/08/25/postgreSQL-for-beginners/" rel="prev" title="PostgreSQL_for_beginners">
                PostgreSQL_for_beginners <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>

          
          </div>
          


          
  <div class="comments" id="comments">
    
      <div class="fb-comments"
           data-href="https://annashuo.github.io/2017/08/24/llvm和jit/"
           data-numposts="10"
           data-width="100%"
           data-colorscheme="light">
      </div>
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            Table of Contents
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            Overview
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/images/avatar.gif"
               alt="Anna" />
          <p class="site-author-name" itemprop="name">Anna</p>
          <p class="site-description motion-element" itemprop="description">My heart is in the work...</p>
        </div>
        <nav class="site-state motion-element">
        
          
            <div class="site-state-item site-state-posts">
              <a href="/archives">
                <span class="site-state-item-count">43</span>
                <span class="site-state-item-name">posts</span>
              </a>
            </div>
          

          
            <div class="site-state-item site-state-categories">
              <a href="/categories">
                <span class="site-state-item-count">6</span>
                <span class="site-state-item-name">categories</span>
              </a>
            </div>
          

          
            <div class="site-state-item site-state-tags">
              <a href="/tags">
                <span class="site-state-item-count">12</span>
                <span class="site-state-item-name">tags</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/Annashuo/Annashuo.github.io" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="http://weibo.com/u/1861044584?is_all=1" target="_blank" title="Weibo">
                  
                    <i class="fa fa-fw fa-weibo"></i>
                  
                  Weibo
                </a>
              </span>
            
          
        </div>

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#传统三段式编译器"><span class="nav-number">1.</span> <span class="nav-text">传统三段式编译器</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#LLVM三阶段设计"><span class="nav-number">2.</span> <span class="nav-text">LLVM三阶段设计</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#LLVM几种格式的文件转换"><span class="nav-number">3.</span> <span class="nav-text">LLVM几种格式的文件转换</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#c源码，IR的比较"><span class="nav-number">3.1.</span> <span class="nav-text">c源码，IR的比较</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#动态编译与即时编译器"><span class="nav-number">4.</span> <span class="nav-text">动态编译与即时编译器</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#静态编译和动态编译"><span class="nav-number">4.1.</span> <span class="nav-text">静态编译和动态编译</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#即时编译器JIT"><span class="nav-number">4.2.</span> <span class="nav-text">即时编译器JIT</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#LLVM-IR"><span class="nav-number">5.</span> <span class="nav-text">LLVM IR</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#LLVM-IR框架"><span class="nav-number">5.1.</span> <span class="nav-text">LLVM IR框架</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Anna</span>
</div>


<div class="powered-by">
  Powered by <a class="theme-link" href="https://hexo.io">Hexo</a>
</div>

<div class="theme-info">
  Theme -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Mist
  </a>
</div>


        

        
      </div>
    </footer>

    <div class="back-to-top">
      <i class="fa fa-arrow-up"></i>
    </div>
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  




  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.0"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.0"></script>



  



  




	





  





  

  
      <!-- UY BEGIN -->
      <script type="text/javascript" src="http://v2.uyan.cc/code/uyan.js?uid="></script>
      <!-- UY END --><!-- hexo-inject:begin --><!-- Begin: Injected MathJax -->
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({"tex2jax":{"inlineMath":[["$","$"],["\\(","\\)"]],"skipTags":["script","noscript","style","textarea","pre","code"],"processEscapes":true},"TeX":{"equationNumbers":{"autoNumber":"AMS"}}});
</script>

<script type="text/x-mathjax-config">
  MathJax.Hub.Queue(function() {
    var all = MathJax.Hub.getAllJax(), i;
    for(i=0; i < all.length; i += 1) {
      all[i].SourceElement().parentNode.className += ' has-jax';
    }
  });
</script>

<script type="text/javascript" src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- End: Injected MathJax -->
<!-- hexo-inject:end -->
  




  
  

  
  


  

  

  


</body>
</html>
